CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
sagemathinc

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: sagemathinc/cocalc
Path: blob/master/src/packages/next/pages/software/julia/[name].tsx
Views: 687
1
/*
2
* This file is part of CoCalc: Copyright © 2021 Sagemath, Inc.
3
* License: MS-RSL – see LICENSE.md for details
4
*/
5
6
import { Alert, Layout } from "antd";
7
8
import { SoftwareEnvNames } from "@cocalc/util/consts/software-envs";
9
import Footer from "components/landing/footer";
10
import Head from "components/landing/head";
11
import Header from "components/landing/header";
12
import Image from "components/landing/image";
13
import SoftwareLibraries from "components/landing/software-libraries";
14
import { Paragraph, Title } from "components/misc";
15
import A from "components/misc/A";
16
import { Customize, CustomizeType } from "lib/customize";
17
import { ExecutableDescription } from "lib/landing/render-envs";
18
import { withCustomizedAndSoftwareSpec } from "lib/landing/software-specs";
19
import {
20
ComputeComponents,
21
ComputeInventory,
22
SoftwareSpec,
23
} from "lib/landing/types";
24
import { STYLE_PAGE } from "..";
25
import screenshot from "/public/software/julia-jupyter.png";
26
27
interface Props {
28
name: SoftwareEnvNames;
29
customize: CustomizeType;
30
spec: SoftwareSpec["julia"];
31
inventory: ComputeInventory["julia"];
32
components: ComputeComponents["julia"];
33
execInfo?: { [key: string]: string };
34
timestamp: string;
35
}
36
37
export default function Julia(props: Props) {
38
const { name, customize, spec, inventory, components, execInfo, timestamp } =
39
props;
40
41
function renderIntro() {
42
return (
43
<>
44
<div style={{ width: "50%", float: "right", padding: "0 0 15px 15px" }}>
45
<Image src={screenshot} alt="Using Julia in a Jupyter notebook" />
46
</div>
47
<Paragraph>
48
Julia is a fast modern compiled language that is{" "}
49
<A href="/features/julia">well supported</A> on CoCalc. This table
50
lists pre-installed <A href="https://julialang.org/">Julia</A>{" "}
51
libraries immediately available in every CoCalc project running on the
52
default "Ubuntu {name}" image. If something is missing, you can{" "}
53
<A href="https://doc.cocalc.com/howto/install-julia-package.html">
54
install additional libraries
55
</A>
56
, or request that we install them.
57
</Paragraph>
58
</>
59
);
60
}
61
62
function renderInfoBox() {
63
return (
64
<Alert
65
style={{ margin: "15px 0" }}
66
message="Learn More"
67
description={
68
<span style={{ fontSize: "10pt" }}>
69
Learn more about{" "}
70
<strong>
71
<A href="/features/julia">Julia in CoCalc</A>
72
</strong>{" "}
73
and our{" "}
74
<strong>
75
<A href="https://doc.cocalc.com/howto/pluto.html">Pluto</A>
76
</strong>{" "}
77
and{" "}
78
<strong>
79
<A href="/features/jupyter-notebook">Jupyter</A>
80
</strong>{" "}
81
Notebook support.
82
</span>
83
}
84
type="info"
85
showIcon
86
/>
87
);
88
}
89
90
return (
91
<Customize value={customize}>
92
<Head title="Julia Packages in CoCalc" />
93
<Layout>
94
<Header page="software" subPage="julia" softwareEnv={name} />
95
<Layout.Content
96
style={{
97
backgroundColor: "white",
98
}}
99
>
100
<div style={STYLE_PAGE}>
101
<Title style={{ textAlign: "center" }}>
102
Installed Julia Packages (Ubuntu {name})
103
</Title>
104
{renderIntro()}
105
{renderInfoBox()}
106
<ExecutableDescription spec={spec} execInfo={execInfo} />
107
<SoftwareLibraries
108
spec={spec}
109
inventory={inventory}
110
components={components}
111
libWidthPct={60}
112
timestamp={timestamp}
113
/>
114
</div>
115
<Footer />
116
</Layout.Content>{" "}
117
</Layout>
118
</Customize>
119
);
120
}
121
122
export async function getServerSideProps(context) {
123
return await withCustomizedAndSoftwareSpec(context, "julia");
124
}
125
126